﻿@model mvcForum.Web.ViewModels.AuthenticateCallbackViewModel

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div id="usercontainer">
    <h1>AuthenticateCallback</h1>

    @if (Model.Exception != null)
    {
        <h2>Error Information</h2>
        <p>>Message: @Model.Exception.Message<br/></p>
        <p>StackTrace: @Model.Exception.StackTrace</p>
    }
    else
    {
        <h2>User Information</h2>
        <p>Provider Type: @Model.AuthenticatedClient.ProviderName</p>
        <p>Public Access Token: @Model.AuthenticatedClient.AccessToken.PublicToken</p>
        <p>Secret Access Token: @Model.AuthenticatedClient.AccessToken.SecretToken</p>
        <p>Access Token Expires On: @Model.AuthenticatedClient.AccessToken.ExpiresOn</p>
        <p>ID: @Model.AuthenticatedClient.UserInformation.Id</p>
        <p>Name: @Model.AuthenticatedClient.UserInformation.Name</p>
        <p>UserName: @Model.AuthenticatedClient.UserInformation.UserName</p>
        <p>Email: @(string.IsNullOrEmpty(Model.AuthenticatedClient.UserInformation.Email) ? "- none provided -" : Model.AuthenticatedClient.UserInformation.Email)</p>
        <p>Locale: @Model.AuthenticatedClient.UserInformation.Locale</p>
        if (!string.IsNullOrEmpty(Model.AuthenticatedClient.UserInformation.Picture))
        {
            <p>Picture:<br/> <img alt="Provider Image" src="@Model.AuthenticatedClient.UserInformation.Picture" /></p>
        }
        <p>Gender: @Model.AuthenticatedClient.UserInformation.Gender.ToString()</p>
        <p>Referrer/RedirectTo Url: @(Model.ReturnUrl == null ? "-none/null-" : Model.ReturnUrl)</p>
    }



    @Html.ActionLink("Lets go back home.", "Index", "Home")
</div>